<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
  </head>
  <body>
    <div>
      <ul id="myul">
        
      </ul>
    </div>
    <script>
      let arr = ["春天", "夏天", "秋天", "冬天"];
      //找到ul标签 dom标签
     let myul=document.getElementById("myul");
      //循环数据
      for(let i=0; i<arr.length; i++){
       // 创建li 的dom标签
      let myli= document.createElement("li");
      myli.innerHTML = arr[i];
      //数据追加
      myul.appendChild(myli)
      }
      
      


    </script>
  </body>
</html>
